<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="/static/js/jquery.min.js" ></script>
    <script type="text/javascript" src="/static/js/util.js" ></script>
    <script>
        $(function () {
            var $btn_execute = $('#btn_execute');
            var $result_container = $('#result_container');

            $btn_execute.bind('click',function (){
                $.post('/getTableList',{},function (result){
                   for(const index in result){
                       const tableName = result[index];
                       console.log(tableName);
                       const data = {};
                       data.tableName = tableName;
                        $.post('/generateTable',data,function (result) {
                            for(const i in result){
                                const msg = result[i];
                                $result_container.html(msg);
                            }
                        })
                   }
                });
            });
        });

    </script>
</head>
<body>
    <p>
        <input id="btn_execute" value="开始采集" type="button"/>
    </p>
    <p id="result_container" style="color:red;font: 15px bold;" ></p>
</body>
</html>
